<template>
  <div class="weCan">
    <div class="fl_nav">
      <div
        :class="{ red:changeRed == index}"
        v-for="(item,index) in navList "
        :key="index"
        @click="change(index)"
      >
        <!-- <span>{{item}}</span> -->
        {{item}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      changeRed: -1,
      navList: ["品牌网站建设", "微信定制开发", "APP定制开发", "VR全景营销"]
    };
  },
  methods: {
    change(key) {
      this.changeRed = key;
      //   this.$router.push({ path: "/index/VR/index" });
      switch (key) {
        case 0:
          //   this.$router.push({ path: "/index/VR/index" });
          window.location.href = "/index/index/index";
          break;
        case 1:
          window.location.href = "/index/VR/index";
          break;
        default:
          break;
      }
    }
  }
};
</script>

<style scoped>
@import url("../../assets/css/weCan/weCan.css");
</style>
